Skip to content

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented Jul 18, 2025

Description of what this PR is changing or adding, and why:
Adds page covering the sensitive content protection feature on Android as it is being released in the next stable version.

Issues fixed by this PR (if any):
N/A

PRs or commits this PR depends on (if any):
N/A

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@flutter-website-bot
Copy link
Collaborator

flutter-website-bot commented Jul 18, 2025

Visit the preview URL for this PR (updated for commit 5c637f1):

https://flutter-docs-prod--pr12220-sensitive-content-3cgantvq.web.app

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is in Draft mode, but I reviewed it anyway. :D

@camsim99 camsim99 marked this pull request as ready for review July 28, 2025 17:03
@camsim99 camsim99 requested review from antfitch, parlough and a team as code owners July 28, 2025 17:03
@camsim99 camsim99 requested review from sfshaza2 and reidbaker July 28, 2025 17:03
Learn how to protect sensitive content in your Flutter app.
---

This feature has landed in Flutter 3.35 and is available on Android API 35+.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we normally indicate what flutter version first introduced a feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops I thought we did but I don't see any examples in https://docs.flutter.dev/platform-integration/android! Removed.


## Using the `SensitiveContent` widget

Given some content that you want to protect from media screen share
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include somewhere in this doc if users need to worry about using sensitive content on non android or non api 35+ platforms and what the fallback behavior is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was already included in the section above but added a note here, as well.

@camsim99 camsim99 requested a review from reidbaker July 29, 2025 17:48
Comment on lines 49 to 50
When running on Android API 35+, this code will have no effect, so the screen
will never been obscured during media projection.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When running on Android API 35+, this code will have no effect, so the screen
will never been obscured during media projection.
When running on Android API 34 and below, the screen will not been obscured during media projection. The widget will exist in the tree but has no other effect and you do not need to avoid usages of Sensitive content on platforms that do not have support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing catch--thank you!

@camsim99
Copy link
Contributor Author

@sfshaza2 Do you want to take another look here or is this good to land?

@camsim99 camsim99 merged commit 3ccf23c into main Aug 12, 2025
9 checks passed
@camsim99 camsim99 deleted the sensitive_content branch August 12, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants